<?php

//use Illuminate\Support\Facades\Schema;
use Jialeo\LaravelSchemaExtend\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateShopRechargeLogsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('shop_recharge_logs', function (Blueprint $table) {
            $table->comment = '充值表';
            $table->increments('id')->comment('订单ID');
			$table->integer('user_id')->comment('用户ID');
			$table->string('order_no',100)->unique()->default('')->comment('订单号');
			$table->tinyInteger('status')->default(0)->comment('订单状态：0=未支付，1=已支付');
			$table->decimal('total_money',8,2)->default('0.00')->comment('到账金额');
			$table->decimal('deliver_money',8,2)->default('0.00')->comment('支付金额');
			$table->string('prepay_id',100)->nullable()->comment('微信支付预订单id');
			$table->string('serial_number',100)->nullable()->comment('支付平台流水号');
			$table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('shop_recharge_logs');
    }
}
